🎖️GitЯра🎖️
.github/agents/speckit.git.remote.agent.md b2a8377bbb01a5875eba4b12f6f1c7e7d9e60a91 (b2a8377b) Text, 1.46 KB
---
Tc9d1d9description: Detect Git remote URL for GitHub integration
Tc9d1d9---
<!-- Extension: git -->
<!-- Config: .specify/extensions/git/ -->
Tc9d1d9# Detect Git Remote URL
Detect the Git remote URL for integration with GitHub services (e.g., issue creation).
Tc9d1d9## Prerequisites
Tff7b72- Check if Git is available by running Ta5d6ff`git rev-parse --is-inside-work-tree 2>/dev/null`
Tff7b72- If Git is not available, output a warning and return empty:
Ta5d6ff ```
[specify] Warning: Git repository not detected; cannot determine remote URL
```
Tc9d1d9## Execution
Run the following command to get the remote URL:
Ta5d6ff```Ta5d6ffbash
git config --get remote.origin.url
Ta5d6ff```
Tc9d1d9## Output
Parse the remote URL and determine:
Tff7b721. **Repository owner**: Extract from the URL (e.g., Ta5d6ff`github` from Ta5d6ff`https://github.com/github/spec-kit.git`)
Tff7b722. **Repository name**: Extract from the URL (e.g., Ta5d6ff`spec-kit` from Ta5d6ff`https://github.com/github/spec-kit.git`)
Tff7b723. **Is GitHub**: Whether the remote points to a GitHub repository
Supported URL formats:
Tff7b72- HTTPS: Ta5d6ff`https://github.com/<owner>/<repo>.git`
Tff7b72- SSH: Ta5d6ff`git@github.com:<owner>/<repo>.git`
Tff7b72> [!CAUTION]
Tff7b72> ONLY report a GitHub repository if the remote URL actually points to github.com.
Tff7b72> Do NOT assume the remote is GitHub if the URL format doesn't match.
Tc9d1d9## Graceful Degradation
If Git is not installed, the directory is not a Git repository, or no remote is configured:
Tff7b72- Return an empty result
Tff7b72- Do NOT error — other workflows should continue without Git remote information
Served by rngit 1.5.2 - Generated in 0.06s